from selenium.webdriver.common.by import By

"""以下为首页网址"""
index_url = "http://user-p2p-test.itheima.net/"

"""以下为注册页面数据"""
# 注册按钮连接
register_link = By.PARTIAL_LINK_TEXT, "注册"
# 手机号
register_phone = By.CSS_SELECTOR, "#phone"
# 密码
register_password = By.CSS_SELECTOR, "#password"
# 验证码
register_verify_code = By.CSS_SELECTOR, "#verifycode"
# 获取手机验证码
register_get_phone_code = By.CSS_SELECTOR, "#get_phone_code"
# 手机验证码
register_phone_code = By.CSS_SELECTOR, "#phone_code"
# 已阅读条款
register_read_terms = By.XPATH, "//*[@id='dy_server']"
# 注册按钮
register_btn = By.CSS_SELECTOR, ".lg-btn"
# 弹窗错误提示信息
register_alert = By.CSS_SELECTOR, ".xubox_text"
# 注册成功提示信息
# register_success = By.XPATH, "//*[@id='step3']/div/div/h1"
register_success = By.CSS_SELECTOR, ".user"

# 手机号为空或格式错误提示信息
register_phone_error = By.XPATH, "//*[@id='reg_form']/div[2]/div[1]/span"
# 密码为空或格式错误提示信息
register_password_error = By.XPATH, "//*[@id='reg_form']/div[2]/div[2]/span"
# 验证码为空或错误(格式,值)的提示信息
register_verify_code_error = By.XPATH, "//*[@id='reg_form']/div[2]/div[3]/span"
# # 手机验证码为空或错误(格式,值)的提示信息
# register_phone_code_error = By.CSS_SELECTOR, ".xubox_layer"

"""以下为登录页面数据"""
# 登录连接
login_link = By.PARTIAL_LINK_TEXT, "登录"
# 手机号
login_phone = By.CSS_SELECTOR, "#keywords"
# 密码
login_password = By.CSS_SELECTOR, "#password"
# 登录按钮
login_btn = By.CSS_SELECTOR, ".login-btn"
# 登录成功
login_success = By.CSS_SELECTOR, ".xubox_text"
# 登录错误(用户名或密码错误、用户名或密码为空、用户不存在)
login_error = By.XPATH, "//*[@id='err']/span"
# 输入两次错误之后，所输入的验证码
login_verify_code = By.CSS_SELECTOR,"[placeholder='验证码']"

'''以下为交易页面数据'''
# 交易记录链接
jy_record_link = By.LINK_TEXT,"交易记录"
# 起始日期链接
start_date = By.CSS_SELECTOR,"[placeholder='起始日期']"
# 截止日期
end_date = By.CSS_SELECTOR,"[placeholder='截止日期']"
# 筛选按钮
filter_btn = By.CSS_SELECTOR,"[value='筛选']"
# 充值记录按钮
cz_record_button = By.LINK_TEXT,"充值记录"
# 提现记录按钮
tx_record_button = By.LINK_TEXT,"提现记录"
# 下拉框选择
select_box = By.CSS_SELECTOR,'[class="sm-select search ng-pristine ng-valid"]'
# 下拉框选择值
# select_box_value = By.CSS_SELECTOR,"/html/body/div[1]/div[2]/div[3]/div/div/div/div[2]/div/span[1]/form/select/option[4]"

# 充值记录选项
cz_check = By.CSS_SELECTOR,"value='1'"
# 提现记录选项
tx_record_check = By.LINK_TEXT,"提现成功"
# 开始日期链接
start_date1 = By.CSS_SELECTOR,"[placeholder='开始日期']"


'''以下为我的红包页面数据'''
# 我的红包链接
my_red_envelope = By.LINK_TEXT,"我的红包"
# 获得时间链接
get_time_link = By.XPATH,"/html/body/div[1]/div[2]/div[3]/div/div[2]/div[1]/ul[2]/li[1]"
# 过期时间链接
gq_time = By.XPATH,"/html/body/div[1]/div[2]/div[3]/div/div[2]/div[1]/ul[2]/li[2]"
# 按金额链接
money_link = By.XPATH,"/html/body/div[1]/div[2]/div[3]/div/div[2]/div[1]/ul[2]/li[3]"
# 已冻结链接
dj_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div/div[2]/div[1]/ul[1]/li[2]"
# 已使用链接
ysy_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div/div[2]/div[1]/ul[1]/li[3]"
# 已过期链接
ygq_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div/div[2]/div[1]/ul[1]/li[4]"


'''以下为我的投资的页面数据'''
# 我的投资链接
my_tz = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[2]/dl/dd[1]/a"
# # 点击回款中
# hkz_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div[2]/div[1]/ul/li[1]"
# 投标中的链接
tbz_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div[2]/div[1]/ul/li[2]"
# 已结清的链接
yjq_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div[2]/div[1]/ul/li[3]"
# 已流标的链接
ylb_link = By.XPATH,"//*[@id='mlayout']/div[2]/div[3]/div[2]/div[1]/ul/li[4]"


'''以下为我的收款计划的页面的数据'''
# 我的收款计划链接
my_skjh = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[2]/dl/dd[3]"
# 还款日期
start_time = By.CSS_SELECTOR,"[placeholder='还款日期']"
# 输入关键字
gjz = By.CSS_SELECTOR,"[placeholder='输入关键字']"


'''以下为基础信息的页面的数据'''
# 基础信息链接
base_info = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[3]/dl/dd[1]"
# 编辑按钮链接
edit_link = By.XPATH,"//*[@id='basic_form']/div[10]/input"
# 毕业院校
graduate_school = By.XPATH,"//*[@id='basic_form']/div[2]/input"
# 点击保存按钮
click_save_btn = By.XPATH,"//*[@id='basic_form']/div[10]/input[1]"


'''以下为提醒设置页面的数据'''
# 提醒设置链接
remind_setting = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[3]/dl/dd[3]"
# 点击站内全选
station_all_select = By.XPATH,"//*[@id='remind_form']/div/div/div[2]/div[2]/table/tbody/tr[1]/td[2]/label/input"
# 点击邮件全选
email_all_select = By.XPATH,"//*[@id='remind_form']/div/div/div[2]/div[2]/table/tbody/tr[1]/td[3]/label/input"
# 点击确认提交按钮
click_confirm_btn = By.XPATH,"//*[@id='remind_form']/div/div/div[5]/input"

'''以下为我的推广页面的数据'''
# 我的推广链接
my_promotion = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[4]/dl/dd[1]"
# 我的推广的搜索框
my_promotion_search = By.XPATH,"//*[@id='username']"
# 搜索按钮
my_promotion_search_btn = By.XPATH,"//*[@id='sou_form']/div/input[2]"

'''以下为推广记录页面的数据'''
# 推广记录链接
promotion_record = By.XPATH,"//*[@id='mlayout']/div[2]/div[2]/div[3]/div[4]/dl/dd[2]"
# 起始时间
start_time_promotion = By.CSS_SELECTOR,"[placeholder='起始日期']"
# 截止时间
end_time_promotion = By.CSS_SELECTOR,"[placeholder='截止日期']"
# 输入用户名
input_username_promotion = By.CSS_SELECTOR,"[placeholder='输入用户名']"
# 点击搜索按钮
click_search_promotion = By.XPATH,"//*[@id='logsou_form']/input[4]"